#include <stdio.h>
int main()
{
    int N = 4, i=1, n, k=2;
    for(int count=1; count<=2*N-1; count++){
        if(i == 2*N-1)
            k=-k;
        for(n = 1; n<=((2*N-1)-i)/2; n++)
            printf(" ");
        for(n = 1; n<=i; n++)
            printf("*");
        printf("\n");
        i+=k;
    }
    return 0;
}